package com.cloudcross.ssp.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cloudcross.ssp.base.dao.GenericIBatisDao;
import com.cloudcross.ssp.common.utils.Pager;
import com.cloudcross.ssp.model.Size;
import com.cloudcross.ssp.service.ISizeService;

@Service
public class SizeService implements ISizeService{
	
	@Autowired
	private GenericIBatisDao myBatisDao;

	public List<Size> findAllSize() {
		return myBatisDao.getList("sizeSqlMapper.findAllSize");
	}

	public List<Size> findAllSizeForZone() {
		return myBatisDao.getList("sizeSqlMapper.findAllSizeForZone");
	}
	
	@Override
	public Size findSize(Long id) {
		return myBatisDao.get("sizeSqlMapper.findSize", id);
	}
	
	@Override
	public Size findSizeId(Long height,Long width) {
		HashMap<String,Object> map = new HashMap<String,Object>();
		map.put("width", width);
		map.put("height", height);
		return myBatisDao.get("sizeSqlMapper.findSizeId", map);
	}

	@Override
	public int countByParams(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public boolean updateStatus(List<Long> idList, int status) {
		return false;
	}

	@Override
	public boolean add(Size t) {
		return false;
	}

	@Override
	public boolean edit(Size t) {
		return false;
	}

	@Override
	public Size findById(Long id) {
		return null;
	}

	@Override
	public List<Size> findByParams(Map<String, Object> paramMap,
			Pager pager) {
		return null;
	}
}